Library with code common to player and game implementation